From 007e4639a8404fba6e71b3e7120de7a34253c2ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sun, 8 Oct 2017 08:28:35 +0200 Subject: [PATCH] snapshot: Set blend mode directly after pushing state This is important since _push_state returns a pointer into a GArray which could be invalidated and point to garbage after the subsequent push_state call. --- gtk/gtksnapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index a9a428db9f..5d2a7f18f6 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -823,6 +823,7 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot, current_state->translate_x, current_state->translate_y, gtk_snapshot_collect_blend_top); + top_state->data.blend.blend_mode = blend_mode; gtk_snapshot_push_state (snapshot, g_strdup (str), @@ -830,7 +831,6 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot, top_state->translate_x, top_state->translate_y, gtk_snapshot_collect_blend_bottom); - top_state->data.blend.blend_mode = blend_mode; } static GskRenderNode * -- 2.30.2